#include "Client.h"
int SockfdCreate(char *argv1,char* argv2){
    int sockfd = socket(AF_INET, SOCK_STREAM, 0);
    ERROR_CHECK(sockfd, -1, "socket");
    struct sockaddr_in serveraddr;
    serveraddr.sin_family = AF_INET;
    serveraddr.sin_port = htons(atoi(argv2));
    serveraddr.sin_addr.s_addr = inet_addr(argv1);
    int cret = connect(sockfd, (struct sockaddr*) &serveraddr, sizeof(serveraddr));
    ERROR_CHECK(cret, -1, "connect");
    printf("Server has been connected\n");
    return sockfd;
}
